package com.anhry.app.safety.manage.oa.bean;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.anhry.app.safety.manage.system.bean.TbUser;

/**
 * @author chen
 * @date 2012-8-9
 */
@Entity
@Table(name="TB_OA_NOTICE")
@SequenceGenerator(name="TB_OA_NOTICE_SEQ", sequenceName="TB_OA_NOTICE_SEQ_DB", allocationSize=1)
public class TbOaNotice implements java.io.Serializable {
	// Fields

	private Long id;
	private String noticeTitle;
	private String noticeContent;
	private String addsUser;
	private String addsUserNames;
	private String addsCorp;
	private String addsCorpNames;
	private String isNote;	//是否短信提醒0：不提醒1：提醒
	private String noteDay;
	private String noteHour;
	private String noteSec;
	private String noteContent;
//	private String noticeUser;
	private TbUser tbUser;
	private Date noticeTime;
	private String isDele;
	private String version;
	private String isExigence;
	private String isCorper;
	private String noticeYear;
	private String noticeQuarter;
	private String noticeMonth;
	private Integer isTop; //是否置顶  1: 置顶 0:不置顶
	private Integer isRed;  //是否红字标题 
	private Integer isAllowDel; //是否可以删除

	// Constructors

	@Column(name="IS_TOP", precision=1)
	public Integer getIsTop() {
		return isTop;
	}

	public void setIsTop(Integer isTop) {
		this.isTop = isTop;
	}

	@Column(name="IS_RED", precision=1)
	public Integer getIsRed() {
		return isRed;
	}

	public void setIsRed(Integer isRed) {
		this.isRed = isRed;
	}

	@Column(name="IS_ALLOW_DEL", precision=1)
	public Integer getIsAllowDel() {
		return isAllowDel;
	}

	public void setIsAllowDel(Integer isAllowDel) {
		this.isAllowDel = isAllowDel;
	}

	/** default constructor */
	public TbOaNotice() {
	}

	/** full constructor */
	public TbOaNotice(String noticeTitle, String noticeContent,
			String addsUser, String addsUserNames, String addsCorp,
			String addsCorpNames, String isNote, String noteDay,String isCorper,
			String noteHour, String noteSec, String noteContent,String isExigence,
			TbUser tbUser, Date noticeTime, String isDele, String version) {
		this.noticeTitle = noticeTitle;
		this.noticeContent = noticeContent;
		this.addsUser = addsUser;
		this.addsUserNames = addsUserNames;
		this.addsCorp = addsCorp;
		this.addsCorpNames = addsCorpNames;
		this.isNote = isNote;
		this.noteDay = noteDay;
		this.noteHour = noteHour;
		this.noteSec = noteSec;
		this.noteContent = noteContent;
		this.tbUser = tbUser;
		this.noticeTime = noticeTime;
		this.isDele = isDele;
		this.version = version;
		this.isExigence = isExigence;
		this.isCorper = isCorper;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TB_OA_NOTICE_SEQ")
	@Column(name = "ID", precision = 11, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="NOTICE_TITLE", length=4000)
	public String getNoticeTitle() {
		return this.noticeTitle;
	}

	public void setNoticeTitle(String noticeTitle) {
		this.noticeTitle = noticeTitle;
	}

	@Column(name="NOTICE_CONTENT", length=4000)
	public String getNoticeContent() {
		return this.noticeContent;
	}

	public void setNoticeContent(String noticeContent) {
		this.noticeContent = noticeContent;
	}

	@Column(name="ADDS_USER")
	public String getAddsUser() {
		return this.addsUser;
	}

	public void setAddsUser(String addsUser) {
		this.addsUser = addsUser;
	}
	@Column(name="ADDS_USER_NAMES")
	public String getAddsUserNames() {
		return this.addsUserNames;
	}

	public void setAddsUserNames(String addsUserNames) {
		this.addsUserNames = addsUserNames;
	}
	@Column(name="ADDS_CORP")
	public String getAddsCorp() {
		return this.addsCorp;
	}

	public void setAddsCorp(String addsCorp) {
		this.addsCorp = addsCorp;
	}
	@Column(name="ADDS_CORP_NAMES")
	public String getAddsCorpNames() {
		return this.addsCorpNames;
	}

	public void setAddsCorpNames(String addsCorpNames) {
		this.addsCorpNames = addsCorpNames;
	}
	@Column(name="IS_NOTE" ,length=1)
	public String getIsNote() {
		return this.isNote;
	}

	public void setIsNote(String isNote) {
		this.isNote = isNote;
	}
	@Column(name="NOTE_DAY" ,length=10)
	public String getNoteDay() {
		return this.noteDay;
	}

	public void setNoteDay(String noteDay) {
		this.noteDay = noteDay;
	}
	@Column(name="NOTE_HOUR" ,length=10)
	public String getNoteHour() {
		return this.noteHour;
	}

	public void setNoteHour(String noteHour) {
		this.noteHour = noteHour;
	}
	@Column(name="NOTE_SEC" ,length=10)
	public String getNoteSec() {
		return this.noteSec;
	}

	public void setNoteSec(String noteSec) {
		this.noteSec = noteSec;
	}
	@Column(name="NOTE_CONTENT" ,length=255)
	public String getNoteContent() {
		return this.noteContent;
	}

	public void setNoteContent(String noteContent) {
		this.noteContent = noteContent;
	}
	@ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
	@JoinColumn(name="NOTICE_USER")
	public TbUser getTbUser() {
		return tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}
	@Column(name="NOTICE_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getNoticeTime() {
		return this.noticeTime;
	}

	public void setNoticeTime(Date noticeTime) {
		this.noticeTime = noticeTime;
	}
	@Column(name="IS_DELE",length=1)
	public String getIsDele() {
		return this.isDele;
	}

	public void setIsDele(String isDele) {
		this.isDele = isDele;
	}
	@Column(name="VERSION",length=10)
	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}
	@Column(name="IS_EXIGENCE",length=1)
	public String getIsExigence() {
		return isExigence;
	}

	public void setIsExigence(String isExigence) {
		this.isExigence = isExigence;
	}
	@Column(name="IS_CORPER",length=1)
	public String getIsCorper() {
		return isCorper;
	}

	public void setIsCorper(String isCorper) {
		this.isCorper = isCorper;
	}
	@Column(name="NOTICE_MONTH",length=10)
	public String getNoticeMonth() {
		return noticeMonth;
	}

	public void setNoticeMonth(String noticeMonth) {
		this.noticeMonth = noticeMonth;
	}
	@Column(name="NOTICE_QUARTER",length=10)
	public String getNoticeQuarter() {
		return noticeQuarter;
	}

	public void setNoticeQuarter(String noticeQuarter) {
		this.noticeQuarter = noticeQuarter;
	}
	@Column(name="NOTICE_YEAR",length=10)
	public String getNoticeYear() {
		return noticeYear;
	}

	public void setNoticeYear(String noticeYear) {
		this.noticeYear = noticeYear;
	}

}